Module Module1
    Public Questions As New List(Of Question)


    Public Function GetID()
        Dim open As New List(Of Integer)
        For Each q As Question In Questions
            open.Add(q.ID)
        Next
        open.Sort()
        For i = 1 To open.Count + 1
            If open.Contains(i) = True Then

            Else : Return i
                Exit Function
            End If
        Next
    End Function
    Public Structure Question
        Dim Type As QuestionType
        Dim Question As String
        Dim Answer As Answer
        Dim ID As Integer
    End Structure

    Public Enum QuestionType
        TrueFalse = 1
        MultipleChoice = 2
        WriteIn = 3
    End Enum
    Public Structure Answer
        Dim type As QuestionType
        Dim Answers As List(Of String)
        Dim CorrectIndex As Integer
    End Structure
End Module
